//
//  SharePanelAdapter.m
//  NetEaseFinancial
//
//  Created by 吴玉峰 on 8/27/15.
//  Copyright (c) 2015 吴玉峰. All rights reserved.
//

#import "WYFSharePanelAdapter.h"
#import "WYFBaseShareAction.h"
#import <UIKit/UIKit.h>

@interface WYFSharePanelAdapter ()

@property (nonatomic, weak) NSArray *shareActions;

@end

@implementation WYFSharePanelAdapter

- (instancetype)initWithShareActions:(NSArray *)shareActions {
    if ((self = [super init])) {
        self.shareActions = shareActions;
    }
    return self;
}

- (NSString *)getLabelAtIndex:(NSUInteger)index {
    WYFBaseShareAction *action = self.shareActions[index];
    return action.getLabelName;
}

- (NSString *)getIconNameAtIndex:(NSUInteger)index {
    WYFBaseShareAction *action = self.shareActions[index];
    return action.getIconName;
}

- (NSUInteger)getCount {
    return self.shareActions.count;
}

@end
